package com.xoa.service.work;

import com.xoa.dao.flowRunFeedback.FlowRunFeedbackMapper;
import com.xoa.dao.flowplugin.FlowPluginMapper;
import com.xoa.dao.work.WorkMapper;
import com.xoa.dao.workflow.FlowProcessMapper;
import com.xoa.dao.workflow.FlowTypeModelMapper;
import com.xoa.model.workflow.FlowTypeModel;
import com.xoa.service.workflow.flowtype.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 工作流 Context 类
 *  此状态对象为多例
 *  主要每一个流程请求都会创建一个WorkFlowServiceContext 对象，
 *  该对象提供各种针对工作流的服务接口  包括流程的状态信息 配置 全局变量等
 *  说明 需要在每个接口中 反向持有WorkFlowServiceContext 引用
 */
@Service
public class WorkFlowServiceContext {

    @Resource
    private FlowTypeService flowTypeService;

    @Resource
    private FlowFormTypeService flowFormTypeService;

    @Resource
    private FlowRunService flowRunService;

    @Resource
    private FlowRunPrcsService flowRunPrcsService;

    @Resource
    private FlowProcessService flowProcessService;

    @Resource
    private WorkMapper workMapper;

    @Resource
    private FlowPluginMapper flowPluginMapper;

    @Resource
    private FlowRunFeedbackMapper flowRunFeedbackMapper;

    @Resource
    private FlowProcessMapper flowProcessMapper;

    @Resource
    private FlowTypeModelMapper flowTypeModelMapper;

    public FlowTypeModelMapper getFlowTypeModelMapper() {
        return flowTypeModelMapper;
    }

    public void setFlowTypeModelMapper(FlowTypeModelMapper flowTypeModelMapper) {
        this.flowTypeModelMapper = flowTypeModelMapper;
    }

    public FlowTypeService getFlowTypeService() {
        return flowTypeService;
    }

    public FlowFormTypeService getFlowFormTypeService() {
        return flowFormTypeService;
    }

    public FlowRunService getFlowRunService() {
        return flowRunService;
    }

    public FlowRunPrcsService getFlowRunPrcsService() {
        return flowRunPrcsService;
    }

    public FlowProcessService getFlowProcessService() {
        return flowProcessService;
    }

    public WorkMapper getWorkMapper() {
        return workMapper;
    }

    public FlowPluginMapper getFlowPluginMapper() {
        return flowPluginMapper;
    }

    public FlowRunFeedbackMapper getFlowRunFeedbackMapper() {
        return flowRunFeedbackMapper;
    }

    public FlowProcessMapper getFlowProcessMapper() {
        return flowProcessMapper;
    }
}
